package UMC.Web;

public class UIFileDialog extends UIDialog {
    public UIFileDialog() {
        this.title("资源上传");
    }

    @Override
    protected String type() {
        return "File";
    }

    public void setAccept(String value) {

        this.config.put("Accept", value);

    }

    /*
     *
     * 是否是多文件
     */
    public void setMultiple(boolean value) {

        if (value) {
            this.config.put("Multiple", true);
        } else {

            this.config.remove("Multiple");
        }

    }

    /*
     * 是否支持上传目录
     *
     */
    public void setDir(boolean value) {

        if (value) {
            this.config.put("Dir", true);
        } else {

            this.config.remove("Dir");
        }
    }
}
